<?php
// print_r($_SERVER);
// printf('<pre>%s</pre>',print_r($_SERVER,true));

//http://localhost:3000/index2.php/one/two/three?a=1&b=2
echo $_SERVER['PHP_SELF'].'<br/>';
echo $_SERVER['SCRIPT_FILENAME'].'<br/>';
echo $_SERVER['REQUEST_METHOD'].'<br/>';
echo $_SERVER['SCRIPT_NAME'].'<br/>';

// QUERY_STRING
echo $_SERVER['QUERY_STRING'].'<br/>';
// URI
echo $_SERVER['REQUEST_URI'].'<br/>';
// PATH_INFO
echo $_SERVER['PATH_INFO'].'<br/>';
?>